package de.baumann.browser.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import de.baumann.browser.R

class Fene344Adapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_344) {

    var sp = -1

    fun setp(p:Int){
        sp = p
        notifyDataSetChanged()
    }

    override fun convert(helper: BaseViewHolder, item: String) {
        if (helper.layoutPosition == sp) {
            helper.setBackgroundRes(R.id.item344, R.drawable.shape_344__)
        } else {
            helper.setBackgroundRes(R.id.item344, R.drawable.shape_344_)
        }
        helper.setText(R.id.item344, item)
    }
}